<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <style type="text/css">
            *{
                padding:0px;
                margin:0px;
                font-size: 12px;
                
            }
            body {
                padding:40px;
                
            }
            .topicList {
                width: 300px;
                border: 1px solid #999;
            }
            
            .topicList li {
                list-style: none;
                padding: 8px 0px;
                margin-left: 10px;
                border-bottom: 1px dotted #aaa;
            }
            .topicList ul {
                display: none;
            }
            
            .topicList h3 {
                height:30px;
                background: #347;
                color:#fff;
                border-bottom: 1px solid #fff;
                cursor: pointer;
            }
            /*  写样式的时候尽量使用class
                
            */
            .topicList h3 span {
                position: relative;
                left: 15px;
                top:10px;
            }
        </style>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script type="text/javascript" src="jquery/jquery-1.8.3.js"></script>
        <script type="text/javascript" src="test/jquery.util.topic.js"></script>
        <script type="text/javascript">
            $(function(){
                $("#btn").toggle(function() {
                    $("input").setReadOnly(true).val("只读");
                },function() {
                    $("input").setReadOnly(false);
                });
            });
            
        </script>
    </head>
    <body>
        <input type="text" value="大家哈off" readonly="readonly"/>
        <input type="button" value="点击" id="btn"/>
    </body>
</html>
